function do_image_index_update() {
global $wgDatabase;
-
+
$meta = $wgDatabase->fieldInfo( "image", "img_major_mime" );
if( $meta->multiple_key == 0 ) {
echo "Updating indexes to 20050912: ";
# and update old broken items.
global $wgDatabase;
$info = $wgDatabase->fieldInfo( 'watchlist', 'wl_notificationtimestamp' );
-
+
if( $info->not_null ) {
echo "Making wl_notificationtimestamp nullable... ";
dbsource( 'maintenance/archives/patch-watchlist-null.sql', $wgDatabase );
$page = $wgDatabase->tableName( 'page' );
$wgDatabase->query( "UPDATE $page SET page_random = RAND() WHERE page_random = 0", 'do_page_random_update' );
$rows = $wgDatabase->affectedRows();
-
+
echo "changed $rows rows\n";
}
function do_templatelinks_update() {
global $wgDatabase, $wgLoadBalancer;
$fname = 'do_templatelinks_update';
-
+
if ( $wgDatabase->tableExists( 'templatelinks' ) ) {
echo "...templatelinks table already exists\n";
return;
'tl_title' => $row->pl_title,
), $fname
);
-
+
}
$wgDatabase->freeResult( $res );
} else {
do_pagelinks_update(); flush();
do_templatelinks_update(); flush(); // after pagelinks
-
+
do_drop_img_type(); flush();
do_user_unique_update(); flush();
do_user_groups_update(); flush();
-
+
do_watchlist_null(); flush();
//do_image_index_update(); flush();